﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 可以着陆的物体
/// </summary>
public abstract class LandingSite : MonoBehaviour
{
    /// <summary>
    /// 玩家着陆
    /// </summary>
    public abstract void OnPlayerLand();
    /// <summary>
    /// 检测是否被玩家碰撞
    /// </summary>
    /// <param name="collider">被碰撞的物体</param>
    /// <returns></returns>
    protected bool CheckPlayer(Collider collider)
    {
        return collider.transform.parent != null && collider.transform.parent.GetComponent<Player>() != null;
    }
}
